package com.my.study.config.hook.application;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 注册一个监听器
 *
 * @author: yidujun
 * @create: 2021/04/02 14:06
 */
@Component
public class NotifyListener implements ApplicationListener<NotifyEvent> {

    @Override
    public void onApplicationEvent(NotifyEvent event) {
        System.out.println("邮件地址：" + event.getEmail());
        System.out.println("邮件内容：" + event.getContent());
    }
}
